<div class="modal-header">
    请选择
    <a  ng-click="cancel()" class="pull-right"  ><i class="glyphicon glyphicon-remove"></i></a>
</div>
<div class="modal-body">
    <div class="input-group m-b">
        <input type="text" class="form-control" id="searchUserValue" ng-keyup="getAllUsers()"  placeholder="请输入用户名称...">
        <span class="input-group-addon"><i class="icon-magnifier"></i></span>
    </div>
    <div class="row">
        <div class="col-lg-7">
            <div class="user-select-nav">
                <ul class="nav nav-tabs nav-sm pull-left" style="width: 100%;">
                    <li ng-class="type==0 ? 'active' : ''"  ng-click="setType('0')" ><a href="">所有人</a></li>
                    <li ng-class="type==1 ? 'active' : ''" ng-click="setType('1')" ><a href="">部门</a></li>
                    <li ng-class="type==2 ? 'active' : ''" ng-click="setType('2')"><a href="">团队</a></li>
                    <li ng-class="type==3 ? 'active' : ''" ng-click="setType('3')"><a href="">我的下属</a></li>
                </ul>
            </div>
            <div class="clearfix"></div>
            <div class="user-select-list">
                <span class="selected-group" ng-show="selectedUserAndGroup.id!=null" >{{selectedUserAndGroup.name}}<a class="text-info return" ng-click="backGroup()" >返回上级</a></span>
                <ul>
                    <li ng-class="userAndGroup.type=='group' ? 'group-item' : ''" ng-repeat="userAndGroup in userAndGroups" ng-click="userAndGroup.type=='group' ? findUserAndGroup(userAndGroup) : ''" >
                        <a class="thumb-xs avatar">
                            <img ng-show="userAndGroup.type=='user'" ng-src="/suite/plugins/servlet/getUserAvatar?user={{userAndGroup.id}}" >
                            <img ng-show="userAndGroup.type=='group'" src="img/group.png" >
                        </a>
                        {{userAndGroup.name}}
                        <a class="text-info opr-link" ng-click="$event.stopPropagation();selectUserAndGroups(userAndGroup)" >选择</a>
                    </li>
                </ul>
            </div>
        </div>

        <div class="col-lg-5">
            <div class="selected-title">
                <span class="pull-left">已选择</span>
                <a class="text-info pull-right" ng-click="selectedUserAndGroups=[];" >清空全部</a>
            </div>
            <div class="user-select-list">
                <ul>
                    <li ng-repeat="userAndGroup in selectedUserAndGroups" >
                        <a class="thumb-xs avatar">
                            <img ng-show="userAndGroup.type=='user'" ng-src="/suite/plugins/servlet/getUserAvatar?user={{userAndGroup.id}}" >
                            <img ng-show="userAndGroup.type=='group'" src="img/group.png" >
                        </a>
                        {{userAndGroup.name}}
                        <a class="opr-link"  ng-click="cleanUserAndGroup(userAndGroup)" ><i class="glyphicon glyphicon-remove"></i></a></li>
                </ul>
            </div>
        </div>
    </div>
</div>
<div class="modal-footer">
    <button class="cancel-handler btn btn-link" ng-click="cancel()" >取消</button>
    <button class="confirm-handler btn btn-primary"  ng-click="ok()" >确定</button>
</div>